package com.hjy;

import java.util.function.Function;

public class MyFunctionDemo {

    //function  数据转换
    public static Integer convert(String value, Function<String, Integer> function){
        return function.apply(value);
    }

    public static void main(String[] args) {
        String value = "888";
        //将所有转换之后的值做变更
        Integer convert = convert(value, s -> Integer.parseInt(value) + 111);
        System.out.println(convert);
    }
}
